//char数组指针大小理解
#include <stdio.h>
#include <string.h>

int main()
{
    char a[] = {'a', 'b', 'c', 'd', 'e', 'f'};
    printf("sizeof\n");
    printf("%d\n", sizeof(a));//6
    printf("%d\n", sizeof(a + 0));//8
    printf("%d\n", sizeof(*a));//1
    printf("%d\n", sizeof(a[1]));//1
    printf("%d\n", sizeof(&a));//8
    printf("%d\n", sizeof(&a + 1));//8
    printf("%d\n", sizeof(&a[0] + 1));//8

    printf("strlen\n");
    printf("%d\n", strlen(a));//随机值
    printf("%d\n", strlen(a + 0));//同一随机值
    printf("%d\n", strlen(*a));//对strlen来说，（）是地址，会导致野指针的问题
    printf("%d\n", strlen(a[1]));//野指针
    printf("%d\n", strlen(&a));//同一随机值
    printf("%d\n", strlen(&a + 1));//同一随机值减六
    printf("%d\n", strlen(&a[0] + 1));//同一随机值减一
    return 0;
}